using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class MusicUIPanel : ShowHidable
{
    public Slider bgmusic;

    public Button quitbutton;

    private void Awake()
    {
        if (bgmusic == null)
        {
            bgmusic.value = PlayerPrefs.GetFloat("music");
        }
    }

    public override void Show(bool animate = true, Action completed = null)
    {
        gameObject.SetActive(true);
    }


    public void OnQuitButtonClick()
    {
        PlayerPrefs.SetFloat("music", bgmusic.value);
        gameObject.SetActive(false);
    }
}
